package com.iran.chainOfResponsibility.example;

import java.util.ArrayList;

public class MainTest {
    public static void main(String[] args) {
        Manager commonManager = new CommonManager("经理");
        Manager majordomo = new Majordomo("总监");
        Manager generalManager = new GeneralManager("总经理");

        commonManager.setSuperior(majordomo);
        majordomo.setSuperior(generalManager);

        ArrayList<Request> requests = new ArrayList<>();
        requests.add(new Request("请假",1,2,"days"));
        requests.add(new Request("报销",5,2000,"￥"));
        requests.add(new Request("报销",5,200,"￥"));
        requests.add(new Request("病假",4,20,"days"));


        requests.forEach(d->{
            commonManager.requestApplications(d);
        });
    }
}
